package com.lx.information.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.lx.information.mapper.InformationCasePhoneMapper;
import com.lx.information.domain.InformationCasePhone;
import com.lx.information.service.IInformationCasePhoneService;

/**
 * 案件电话Service业务层处理
 * 
 * @author lx
 * @date 2023-04-03
 */
@Service
public class InformationCasePhoneServiceImpl implements IInformationCasePhoneService 
{
    @Autowired
    private InformationCasePhoneMapper informationCasePhoneMapper;

    /**
     * 查询案件电话
     * 
     * @param id 案件电话主键
     * @return 案件电话
     */
    @Override
    public InformationCasePhone selectInformationCasePhoneById(Long id)
    {
        return informationCasePhoneMapper.selectInformationCasePhoneById(id);
    }

    /**
     * 查询案件电话列表
     * 
     * @param informationCasePhone 案件电话
     * @return 案件电话
     */
    @Override
    public List<InformationCasePhone> selectInformationCasePhoneList(InformationCasePhone informationCasePhone)
    {
        return informationCasePhoneMapper.selectInformationCasePhoneList(informationCasePhone);
    }

    /**
     * 新增案件电话
     * 
     * @param informationCasePhone 案件电话
     * @return 结果
     */
    @Override
    public int insertInformationCasePhone(InformationCasePhone informationCasePhone)
    {
        informationCasePhone.setCreateTime(DateUtils.getNowDate());
        return informationCasePhoneMapper.insertInformationCasePhone(informationCasePhone);
    }

    /**
     * 修改案件电话
     * 
     * @param informationCasePhone 案件电话
     * @return 结果
     */
    @Override
    public int updateInformationCasePhone(InformationCasePhone informationCasePhone)
    {
        informationCasePhone.setUpdateTime(DateUtils.getNowDate());
        return informationCasePhoneMapper.updateInformationCasePhone(informationCasePhone);
    }

    /**
     * 批量删除案件电话
     * 
     * @param ids 需要删除的案件电话主键
     * @return 结果
     */
    @Override
    public int deleteInformationCasePhoneByIds(Long[] ids)
    {
        return informationCasePhoneMapper.deleteInformationCasePhoneByIds(ids);
    }

    /**
     * 删除案件电话信息
     * 
     * @param id 案件电话主键
     * @return 结果
     */
    @Override
    public int deleteInformationCasePhoneById(Long id)
    {
        return informationCasePhoneMapper.deleteInformationCasePhoneById(id);
    }
}
